import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  { 
    path: "/",
    name: 'index', 
    component: () => import("@/views/index.vue") 
  },
  { 
    path: "/about", 
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (About.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import("@/views/about.vue")
  },
];

export const router = createRouter({
  history: createWebHistory(),
  routes,
});
